package com.mvvm.start.main.mvvm.v.fragment.home

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import com.mvvm.start.base.base.BaseFragment
import com.mvvm.start.base.utils.toast
import com.mvvm.start.common.mvvm.vm.PublicViewModle
import com.mvvm.start.main.databinding.FragmentLocalBinding


/**
 * @author lmy
 * @功能: 本地脚本的Fragment
 * @Creat 2021/5/31 22:21
 * @Compony 465008238@qq.com
 */
class LocalTaskFragment : BaseFragment<PublicViewModle, FragmentLocalBinding>() {
    override fun initViews() {
        viewBinding.localModle = mViewModel
    }
    override fun initObserve() {
        mViewModel.apply {
        }
    }
    override fun initData() {
    }
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        if (requestCode == 1) {
            if (resultCode != AppCompatActivity.RESULT_OK) {
                "取消授权，如遇立即开始无法点击，请重启手机".toast()
                return
            } else if (data != null && resultCode != 0) {
            }
        }
    }
}